<template>
  <div>
    <el-drawer :visible.sync="isDrawer" :direction="direction">
      <template slot="title">
        <div class="drawer-title">回款详情</div>
      </template>
      <div class="head-box">
        <div class="identifier-box"></div>
        <div>回款信息</div>
      </div>
      <div class="collection-form-box">
        <div class="left-box">
          <div>回款日期：</div>
          <div>回款金额：</div>
          <div>预计下次回款日期：</div>
          <div>预计下次回款金额：</div>
        </div>
        <div class="right-box">
          <div>
            <el-date-picker
              v-model="collTime"
              type="date"
              placeholder="选择日期"
            >
            </el-date-picker>
          </div>
          <div><input type="text" v-model="finAmount" /></div>
          <div>
            <el-date-picker
              v-model="nextTime"
              type="date"
              placeholder="选择日期"
            >
            </el-date-picker>
          </div>
          <div><input type="text" v-model="nextAmount" /></div>
        </div>
      </div>
      <div class="head-box" style="height: 0"></div>
      <div class="sub-btn">
        <div>提交</div>
        <div>取消</div>
      </div>
    </el-drawer>
  </div>
</template>

<script>
import {
  getProjectInfoApi,
  getProjectContractApi,
  getProjectTeamApi,
  getProjectMilestonesApi,
  getProjectDutyApi,
} from "@/api/index";

export default {
  props: {
    drawer: {
      type: Boolean,
      default: false,
    },
    projectRow: {
      type: Object,
      default: false,
    },
  },
  data() {
    return {
      // 是否弹出抽屉
      isDrawer: false,
      // 抽屉弹出方向
      direction: "rtl",
      // 已回款日期
      collTime: "",
      // 已回款金额
      finAmount: "",
      // 预计下次回款日期
      nextTime: "",
      // 预计下次回款金额
      nextAmount: "",
    };
  },

  mounted() {},

  methods: {
    openDrawer(row) {
      // let data = {
      //   procode: row.procode,
      // };
      console.log("openDrawer------->");
      this.proName = row.proshortname;
      this.isDrawer = true;
    },

    // 提交回款信息
    submitCollection() {},
  },
};
</script>

<style lang="scss" scoped>
.main-box {
  .drawer-title {
    font-size: 16px;
  }
  .head-box {
    border-bottom: 1px solid #dddcdc;
    height: 30px;
    line-height: 30px;
    text-align: start;
    font-size: 13px;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 20px;
    display: flex;
    align-items: center;

    .identifier-box {
      height: 10px;
      width: 5px;
      margin-right: 6px;
      background: #106799;
    }
  }

  .collection-form-box {
    display: flex;

    .left-box,
    .right-box {
      /* border: 1px solid red; */

      > div {
        /* border: 1px solid green; */
        height: 40px;
        font-size: 13px;
        line-height: 40px;
      }
    }

    .left-box {
      margin-left: 20px;
      width: 31%;
      text-align: end;
    }

    .right-box {
      width: 60%;

      > div {
        > input {
          width: 90%;
          height: 26px;
          border: 1px solid #dddcdc;
          border-radius: 4px;
          padding-left: 10px;
        }

        .el-date-editor {
          width: 95%;
        }
      }
    }
  }

  .sub-btn {
    /* border: 1px solid #dddcdc; */
    width: 100%;
    margin: 10px 0;
    display: flex;
    justify-content: end;
    padding-right: 10px;

    > div {
      /* border: 1px solid #ee1a1a; */
      text-align: center;
      height: 30px;
      width: 20%;
      margin-left: 10px;
      line-height: 30px;
      color: #fff;
      background: #57a6e7;
      border-radius: 5px;
    }

    > div:hover {
      cursor: pointer;
      background: rgba($color: #57a6e7, $alpha: 0.8);
    }
  }
}
</style>